Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
custom-media-element
Advanced tools
A custom element for extending the native media elements ( or <video>)
A custom element for extending the native media elements (<audio>
or <video>
).
import { CustomVideoElement } from 'custom-media-element';
class MyCustomVideoElement extends CustomVideoElement {
constructor() {
super();
}
// Override the play method.
play() {
return super.play()
}
// Override the src getter & setter.
get src() {
return super.src;
}
set src(src) {
super.src = src;
}
}
if (globalThis.customElements && !globalThis.customElements.get('my-custom-video')) {
globalThis.customElements.define('my-custom-video', MyCustomVideoElement);
}
export default MyCustomVideoElement;
<my-custom-video
src="https://stream.mux.com/A3VXy02VoUinw01pwyomEO3bHnG4P32xzV7u1j1FSzjNg/low.mp4"
></my-custom-video>
export const Events: string[];
export const audioTemplate: HTMLTemplateElement;
export const videoTemplate: HTMLTemplateElement;
export class CustomAudioElement extends HTMLAudioElement implements HTMLAudioElement {
static readonly observedAttributes: string[];
static Events: string[];
static template: HTMLTemplateElement;
readonly nativeEl: HTMLAudioElement;
attributeChangedCallback(attrName: string, oldValue?: string | null, newValue?: string | null): void;
connectedCallback(): void;
disconnectedCallback(): void;
handleEvent(event: Event): void;
}
export class CustomVideoElement extends HTMLVideoElement implements HTMLVideoElement {
static readonly observedAttributes: string[];
static Events: string[];
static template: HTMLTemplateElement;
readonly nativeEl: HTMLVideoElement;
attributeChangedCallback(attrName: string, oldValue?: string | null, newValue?: string | null): void;
connectedCallback(): void;
disconnectedCallback(): void;
handleEvent(event: Event): void;
}
type CustomMediaElementConstructor<T> = {
readonly observedAttributes: string[];
Events: string[];
template: HTMLTemplateElement;
new(): T
};
export function CustomMediaMixin(superclass: any, options: { tag: 'video', is?: string }):
CustomMediaElementConstructor<CustomVideoElement>;
export function CustomMediaMixin(superclass: any, options: { tag: 'audio', is?: string }):
CustomMediaElementConstructor<CustomAudioElement>;
<hls-video>
A custom element for playing HTTP Live Streaming (HLS) videos.<youtube-video>
A custom element for the YouTube player.<vimeo-video>
A custom element for the Vimeo player.<spotify-audio>
A custom element for the Spotify player.<jwplayer-video>
A custom element for the JW player.<wistia-video>
A custom element for the Wistia player.<cloudflare-video>
A custom element for the Cloudflare player.<videojs-video>
A custom element for Video.js.<castable-video>
Cast your video element to the big screen with ease!<mux-player>
The official Mux-flavored video player custom element.<mux-video>
A Mux-flavored HTML5 video element w/ hls.js and Mux data builtin.FAQs
A custom element for extending the native media elements ( or <video>)
The npm package custom-media-element receives a total of 92,172 weekly downloads. As such, custom-media-element popularity was classified as popular.
We found that custom-media-element demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.